﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CanDoo.Core;
using CanDoo.Data;
using CanDoo.Contracts;
using CanDoo.Oil.Core.Models;
using CanDoo.Core.Data;
using CanDoo.Oil.Core.DTOs;

namespace CanDoo.Oil.Core.Contracts
{
    /// <summary>
    /// 业务契约——客户
    /// </summary>
    public interface ICustomerContract : IServiceBaseCore<Customer>, IServiceBase<Customer>
    {
        /// <summary>
        /// 1.1.6门店介绍 : 
        /// </summary>
        /// <param name="storeNo">门店号</param>
        /// <returns>门店基本信息介绍</returns>
        StoreIntroduction GetStoreIntroductionByStoreNo(string storeNo);
        UserInfo GetUserInfoByLoginInfo(LoginInfo loginInfo);

        /// <summary>
        /// 根据uid与金额判断会员能否取油
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="money"></param>
        /// <returns>可以取油返回 操作成功,不可取油返回操作失败,并返回不能取油原因</returns>
        OperationResult CanTakeOil(OilTankUserInfo oilTankUserInfo);

        /// <summary>
        /// 储值卡充值/储油卡充值/机器卡取现
        /// </summary>
        /// <param name="entityId"></param>
        /// <param name="money"></param>
        /// <returns></returns>
        OperationResult Recharge(long entityId, double money);

        /// <summary>
        /// 卡号
        /// </summary>
        /// <param name="cardNo">卡号</param>
        /// <returns></returns>
        CustomerApiInfo GetByCardNo(string cardNo);
    }
}

